package com.carpedil.demo.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.List;

/** @author Administrator */
@Data
@NoArgsConstructor
@Component
@TableName("roles")
public class Role implements Serializable {
  @TableId(value = "pk_id", type = IdType.AUTO)
  private Integer pkId;

  private String roleName;
  private String roleInfo;
  private Integer roleLevel;

  @TableField(exist = false)
  @JsonIgnoreProperties(value = {"handler"})
  private List<Permission> permissions;
}
